const express = require('express')
const router = express.Router()
const announcementsApi = require('../controller/announcements')

router.post('/announcementtags', announcementsApi.createTag)

router.delete('/announcementtags/:tagId', announcementsApi.removeTagFromTeam)

router.patch('/announcementtags/:tagId', announcementsApi.updateTagWithName)

router.get('/announcementtags/teams/:teamId', announcementsApi.getAllTagsInTeam)

router.get('/announcements/teams/:teamId', announcementsApi.getAllAnnInTeam)

router.post('/announcements/teams/:teamId', announcementsApi.createAnnInTeam)

router.delete('/announcements/:announcementId', announcementsApi.removeAnnouncement)

router.get('/announcements/:announcementId', announcementsApi.getAnnouncement)

module.exports = router
